std::basic_string::data

From Cppreference

Jump to: navigation, search
const CharT* data() const;

Returns pointer to the underlying array serving as character storage. Specifically the pointer is such that range [data(); data() + size()) is a valid.

Contents

Parameters

(none)

Return value

pointer to the underlying character storage.

Complexity

constant.

See also

front (C++0x)
accesses the first character
(public member function)
back (C++0x)
accesses the last character
(public member function)
c_str
returns a non-modifiable standard C character array version of the string
(public member function)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages